home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / OCETemplates.p < prev    next >
Text File  |  1996-05-01  |  89KB  |  1,912 lines

  1. {
  2.      File:        OCETemplates.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment Templates Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OCETemplates;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OCETEMPLATES__}
  28. {$SETC __OCETEMPLATES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OCETemplatesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __EVENTS__}
  38. {$I Events.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __OCE__}
  41. {$I OCE.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __OCESTANDARDMAIL__}
  44. {$I OCEStandardMail.p}
  45. {$ENDC}
  46.  
  47. {$PUSH}
  48. {$ALIGN MAC68K}
  49. {$LibExport+}
  50.  
  51. {$IFC FOR_SYSTEM7_ONLY }
  52. {
  53. ***********************************************************************************************
  54.  ********************************* Template Resource Constants: *********************************
  55.  ***********************************************************************************************
  56. }
  57. {  Current versions of all the different template types:  }
  58.  
  59. CONST
  60.     kDETAspectVersion            = -976;
  61.     kDETInfoPageVersion            = -976;
  62.     kDETKillerVersion            = -976;
  63.     kDETForwarderVersion        = -976;
  64.     kDETFileTypeVersion            = -976;
  65.  
  66. {
  67.     "Normal" separation for template IDs within the file (this is just a suggestion; you can use whatever
  68.     separation you like, so long as two separate templates don't have overlapping resources): 
  69. }
  70.     kDETIDSep                    = 250;
  71.  
  72. {  A few predefined base IDs (again, just suggestions):  }
  73.     kDETFirstID                    = 1000;
  74.     kDETSecondID                = 1250;
  75.     kDETThirdID                    = 1500;
  76.     kDETFourthID                = 1750;
  77.     kDETFifthID                    = 2000;
  78.  
  79. {
  80.     Templates consist of a set of associated resources, at constant offsets from a "base ID" set by the
  81.     signature resource of the template. In the case of aspect templates, most of the resources in the
  82.     template are accessible from the template as property default values. The property number is the same
  83.     as the offset from the base ID of the resource. In describing the resources which make up templates,
  84.     we give the type, the offset, and a description. For aspect templates, the offset is also the property #. 
  85.     
  86.     All templates include the following resource fork resources:
  87.  
  88.      Type    Offset                        Description
  89.      ----    ------                        -----------
  90.     'rstr'    kDETTemplateName            Contains the name of the template
  91.  
  92. }
  93.     kDETTemplateName            = 0;
  94.  
  95. {
  96.     Aspects, info-pages, and forwarders include the following as well:
  97.  
  98.      Type    Offset                        Description
  99.      ----    ------                        -----------
  100.     'rstr'    kDETRecordType                Contains the type of record this applies to
  101.     'rstr'    kDETAttributeType            Contains the type of attribute this applies to
  102.     'detn'    kDETAttributeValueTag        Contains the tag of the attribute values this applies to
  103.  
  104. }
  105.     kDETRecordType                = 1;
  106.     kDETAttributeType            = 2;
  107.     kDETAttributeValueTag        = 3;
  108.  
  109. {  ************************************ Aspects  }
  110. {
  111.     In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
  112.     defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
  113.     both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
  114.     resource). Resource types are given in all cases below; even if there is no actual resource (for example in
  115.     the case of kDETAspectName), it indicates the type for the dynamically generated property. A resource type of
  116.     'rstr' corresponds to a property type of kDETPrTypeString; type 'detn' corresponds to kDETPrTypeNumber; and
  117.     'detb' corresponds to kDETPrTypeBinary.
  118.  
  119.      Type    Offset                        Description
  120.      ----    ------                        -----------
  121.     'deta'    0                            Identifies the type of resource
  122.     'detc'    kDETCode                    Is the code resource, if any is used
  123.     'ICN#'    kDETAspectMainBitmap
  124.     'icl8'    kDETAspectMainBitmap
  125.     'icl4'    kDETAspectMainBitmap
  126.     'ics#'    kDETAspectMainBitmap
  127.     'ics8'    kDETAspectMainBitmap
  128.     'ics4'    kDETAspectMainBitmap
  129.     'sicn'    kDETAspectMainBitmap        Is the icon suite to display for this item type (main aspect only)
  130.     'rstr'    kDETAspectName                Contains the name of the item (attribute main aspect only)
  131.     'rst#'    kDETAspectCategory            Contains the internal categories for the record type (main aspect only)
  132.     'rst#'    kDETAspectExternalCategory    Contains the external (user-visible) names which correspond to the categories in
  133.                                         kDETAspectCategory; if this resource is not present, external names are taken from
  134.                                         another template; if no other template provides an external name for a given internal
  135.                                         category, the internal name is used as the external name (main aspect only)
  136.     'rstr'    kDETAspectKind                Is the item kind to display (main aspect only)
  137.     'detn'    kDETAspectGender            Is the gender of this kind of object for internationalization (main aspect only)
  138.     'rstr'    kDETAspectWhatIs            Is the string for balloon help when item is in sublist (main aspect only)
  139.     'rstr'    kDETAspectAliasKind            Is the item kind to display for aliases to this type of item (main aspect only)
  140.     'detn'    kDETAspectAliasGender        Is the gender of an alias to this kind of object for internationalization (main aspect only)
  141.     'rstr'    kDETAspectAliasWhatIs        Is the string for balloon help when an alias to the item is in sublist (main aspect only)
  142.     'rst#'    kDETAspectBalloons            Is a list of strings for balloon help; for each item in an info-page, it's
  143.                                         property # times 2 is used as an index into this array; if the item is not editable,
  144.                                         then the property # times 2 plus 1 is used
  145.     'rstr'    kDETAspectNewMenuName        Is the string to be used for the user to select new item creation; for records, the
  146.                                         string is used as a menu entry in the Catalogs menu; for attributes, the string
  147.                                         is used in a selection dialog invoked by an "Add..." button
  148.     'rstr'    kDETAspectNewEntryName        Is the name to be used for new records (with a digit appended if not unique)
  149.     'detb'    kDETAspectNewValue            Is the value to use when creating a new attribute value; the first four bytes
  150.                                         is the tag; the rest is the attribute value contents
  151.     'detn'    kDETAspectSublistOpenOnNew    If true (non-zero), automatically open newly created entries (property can be set
  152.                                         from a code resource, or via a default value in a resource)
  153.     'dett'    kDETAspectLookup            Is the attribute-to-property translation table
  154.     'rstr'    kDETAspectDragInString        Is a string describing the action of dragging into this aspect (if any)
  155.     'rstr'    kDETAspectDragInVerb        Is a single, short word that's the verb of the action (like "add" or "drop"; if
  156.                                         there's any doubt, use "OK")
  157.     'rstr'    kDETAspectDragInSummary        Is a short phrase that describes the action, suitable to be included in a selection list
  158.     'rst#'    kDETAspectRecordDragIn        Is a list of type pairs; in each pair, the first is the type of a record which
  159.                                         can be dragged into this aspect, and the second is the attribute type to store
  160.                                         the reference in
  161.     'rst#'    kDETAspectRecordCatDragIn    Is a list of category/attribute type pairs; in each pair, the first is the
  162.                                         category of records which can be dragged in, and the second is the type of
  163.                                         attribute to place the alias in
  164.     'rst#'    kDETAspectAttrDragIn        Is a list of type triples; in each triple, the first is the record type which can be
  165.                                         dragged from (or "" for any), the second is the attribute type which can be dragged
  166.                                         in, and the third is the attribute type to store the new attribute in
  167.     'rst#'    kDETAspectDragOut            Is a list of attribute types which can be dragged out of this aspect (an 'rst#'
  168.                                         resource with no entries means nothing can be dragged out; no 'rst#' resource means
  169.                                         everything can be dragged out)
  170.     'detm'    kDETAspectViewMenu            Is a table to fill in the view menu from
  171.     'detp'    kDETAspectReverseSort        Is a table listing which properties to sort in reverse order
  172.     'detw'    kDETAspectInfoPageCustomWindow    Is a specification of a custom window size/placement & whether to use the
  173.                                             page-selector (main aspect only)
  174.     'detv'    kDETAspectInfoPageCustomWindow    Is a view list which is common to all info-pages (main aspect only)
  175. }
  176.     kDETAspectCode                = 4;
  177.     kDETAspectMainBitmap        = 5;
  178.     kDETAspectName                = 6;
  179.     kDETAspectCategory            = 7;
  180.     kDETAspectExternalCategory    = 8;
  181.     kDETAspectKind                = 9;
  182.     kDETAspectGender            = 10;
  183.     kDETAspectWhatIs            = 11;
  184.     kDETAspectAliasKind            = 12;
  185.     kDETAspectAliasGender        = 13;
  186.     kDETAspectAliasWhatIs        = 14;
  187.     kDETAspectBalloons            = 15;
  188.     kDETAspectNewMenuName        = 16;
  189.     kDETAspectNewEntryName        = 17;
  190.     kDETAspectNewValue            = 18;
  191.     kDETAspectSublistOpenOnNew    = 19;
  192.     kDETAspectLookup            = 20;
  193.     kDETAspectDragInString        = 21;
  194.     kDETAspectDragInVerb        = 22;
  195.     kDETAspectDragInSummary        = 23;
  196.     kDETAspectRecordDragIn        = 24;
  197.     kDETAspectRecordCatDragIn    = 25;
  198.     kDETAspectAttrDragIn        = 26;
  199.     kDETAspectAttrDragOut        = 27;
  200.     kDETAspectViewMenu            = 28;
  201.     kDETAspectReverseSort        = 29;
  202.     kDETAspectInfoPageCustomWindow = 30;
  203.  
  204. {  Properties:  }
  205.     kDETNoProperty                = -1;
  206.  
  207. {  Each aspect has 250 attribute properties in this range:  }
  208.     kDETFirstLocalProperty        = 0;
  209.     kDETLastLocalProperty        = 249;
  210.  
  211. {  Developers should use property numbers starting at this point:  }
  212.     kDETFirstDevProperty        = 40;
  213.  
  214. {
  215.  The following range provides constant numeric properties for use in patterns and comparisons (constant n is
  216.   
  217.    given by kDETFirstConstantProperty+n): 
  218. }
  219.     kDETFirstConstantProperty    = 250;
  220.     kDETLastConstantProperty    = 499;
  221.  
  222. {  To convert a number into a constant property, add this:  }
  223.     kDETConstantProperty        = 250;
  224.     kDETZeroProperty            = 250;
  225.     kDETOneProperty                = 251;
  226.     kDETFalseProperty            = 250;
  227.     kDETTrueProperty            = 251;
  228.  
  229. {  The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists:  }
  230.     kDETPrName                    = 3050;
  231.     kDETPrKind                    = 3051;
  232.  
  233. {  Access mask properties:  }
  234.     kDETDNodeAccessMask            = 25825;                        {  The DNode access mask  }
  235.     kDETRecordAccessMask        = 25826;                        {  The record access mask  }
  236.     kDETAttributeAccessMask        = 25827;                        {  The attribute access mask  }
  237.     kDETPrimaryMaskByBit        = 25828;                        {  A set of sixteen properties to access all bits of the primary mask  }
  238.  
  239. {  See AOCE documentation for details definitions of each of these bits:  }
  240.     kDETPrimarySeeMask            = 25828;
  241.     kDETPrimaryAddMask            = 25829;
  242.     kDETPrimaryDeleteMask        = 25830;
  243.     kDETPrimaryChangeMask        = 25831;
  244.     kDETPrimaryRenameMask        = 25832;
  245.     kDETPrimaryChangePrivsMask    = 25833;
  246.     kDETPrimaryTopMaskBit        = 25843;
  247.  
  248. {  The following property is zero until we've completed the first catalog lookup; from then on it's 1  }
  249.     kDETPastFirstLookup            = 26550;
  250.  
  251. {  The following property is the page number; issuing a property command with this property will flip info-pages  }
  252.     kDETInfoPageNumber            = 27050;
  253.  
  254. {
  255.  The value of the following properties contains the template number of the targeted aspect's template, and the
  256.    currently open info-page (if any). These values can be used with kDETAspectTemplate and kDETInfoPageTemplate
  257.    target selectors. 
  258. }
  259.     kDETAspectTemplateNumber    = 26551;
  260.     kDETInfoPageTemplateNumber    = 26552;
  261.  
  262. {  Properties for property commands to deal with sublist items:  }
  263.     kDETOpenSelectedItems        = 26553;                        {  Open selected sublist items  }
  264.     kDETAddNewItem                = 26554;                        {  Add new sublist item  }
  265.     kDETRemoveSelectedItems        = 26555;                        {  Remove selected sublist items  }
  266.  
  267. {
  268.  Property types are used to specify types of properties and conversions between types (zero and negative numbers
  269.    are reserved for Apple; developer code resources can use positive numbers): 
  270. }
  271.     kDETPrTypeNumber            = -1;                            {  A number  }
  272.     kDETPrTypeString            = -2;                            {  A string  }
  273.     kDETPrTypeBinary            = -3;                            {  A binary block  }
  274.  
  275. {  ************************************ Info-pages  }
  276. {
  277.  Info-pages include the following as well:
  278.  
  279.      Type    Offset                        Description
  280.      ----    ------                        -----------
  281.     'deti'    0                            Identifies the type of resource; see below for details on the contents
  282.     'rstr'    kDETInfoPageName            Is the name of the view to use in the page selection pop-up
  283.     'rstr'    kDETInfoPageMainViewAspect    Is the name of the aspect to use with the main page view
  284.     'rstr'    kDETInfoPageMenuName        Is the name of the catalogs menu ("Catalogs" if not present)
  285.     'detm'    kDETInfoPageMenuEntries        Are menu entries to go in the Catalogs menu
  286.  
  287. }
  288.     kDETInfoPageName            = 4;
  289.     kDETInfoPageMainViewAspect    = 5;
  290.     kDETInfoPageMenuName        = 6;
  291.     kDETInfoPageMenuEntries        = 7;
  292.  
  293. {
  294.  ************************************ Views 
  295.  
  296.    Flags: 
  297. }
  298.     kDETNoFlags                    = 0;                            {  Main view (non-sublist) field enabled  }
  299.     kDETEnabled                    = $01;
  300.  
  301. {  The following flags make sense for items in a sublist only  }
  302.                                                                 {  Hilight view when entry is selected  }
  303.     kDETHilightIfSelected        = $01;
  304.  
  305. {  The following flags make sense for text views only  }
  306.     kDETNumericOnly                = $08;                            {  Only allow the user to enter digits  }
  307.     kDETMultiLine                = $10;                            {  Allow multiple lines in view  }
  308.     kDETDynamicSize                = $0200;                        {  Don't draw box around text until user clicks in it, then auto-size it  }
  309.                                                                 {  Don't allow the user to enter colons (convert ":"s to "-"s)  }
  310.     kDETAllowNoColons            = $0400;
  311.  
  312. {  The following flags are used for pop-up menus only  }
  313.                                                                 {  Automatically resize pop-up based on contents  }
  314.     kDETPopupDynamicSize        = $0100;
  315.  
  316. {  The following flags are used for EditPicture views only  }
  317.                                                                 {  Scale picture to view bounds rather than cropping  }
  318.     kDETScaleToView                = $0100;
  319.  
  320. {     Sizes for icons  }
  321.     kDETLargeIcon                = 0;
  322.     kDETSmallIcon                = 1;
  323.     kDETMiniIcon                = 2;
  324.  
  325. {  Stolen from TextEdit.h  }
  326.     kDETLeft                    = 0;
  327.     kDETCenter                    = 1;
  328.     kDETRight                    = -1;
  329.     kDETForceLeft                = -2;
  330.  
  331. {  Flags for use within Box view type attributes - these are distinct from the flags above  }
  332.     kDETUnused                    = 0;
  333.     kDETBoxTakesContentClicks    = $01;
  334.     kDETBoxIsRounded            = $02;
  335.     kDETBoxIsGrayed                = $04;
  336.     kDETBoxIsInvisible            = $08;
  337.  
  338. {  The common font info  }
  339.     kDETApplicationFont            = 1;
  340.     kDETApplicationFontSize        = 9;
  341.     kDETAppFontLineHeight        = 12;
  342.     kDETSystemFont                = 0;
  343.     kDETSystemFontSize            = 12;
  344.     kDETSystemFontLineHeight    = 16;
  345.     kDETDefaultFont                = 1;
  346.     kDETDefaultFontSize            = 9;
  347.     kDETDefaultFontLineHeight    = 12;
  348.  
  349. {     These were taken from QuickDraw.h (where they're enums and therefore unusable in resource definitions):  }
  350.     kDETNormal                    = 0;
  351.     kDETBold                    = 1;
  352.     kDETItalic                    = 2;
  353.     kDETUnderline                = 4;
  354.     kDETOutline                    = 8;
  355.     kDETShadow                    = $10;
  356.     kDETCondense                = $20;
  357.     kDETExtend                    = $40;
  358.  
  359.     kDETIconStyle                = -3;                            {  Normal text style for regular sublist entries, italic text style for aliases  }
  360.  
  361. {  View menu:  }
  362.     kDETChangeViewCommand        = 'view';                        {  Change the view; used especially in StaticCommandTextFromView sublist headers  }
  363.  
  364. {  Info-page window sizes:  }
  365. {  Default record info-pages:  }
  366.     kDETRecordInfoWindHeight    = 228;
  367.     kDETRecordInfoWindWidth        = 400;
  368.  
  369. {  Default attribute info-pages:  }
  370.     kDETAttributeInfoWindHeight    = 250;
  371.     kDETAttributeInfoWindWidth    = 230;
  372.  
  373. {  Page identifying icon (for default info-page layout):  }
  374.     kDETSubpageIconTop            = 8;
  375.     kDETSubpageIconLeft            = 8;
  376.     kDETSubpageIconBottom        = 40;
  377.     kDETSubpageIconRight        = 40;
  378.  
  379. {
  380.  ************************************ Killers 
  381.  
  382.    Killers include the following as well:
  383.  
  384.      Type    Offset                        Description
  385.      ----    ------                        -----------
  386.     'detk'    0                            Identifies the type of resource; see below for details on the contents
  387.     'rst#'    kDETKillerName                Contains a list of template names to be killed
  388.  
  389. }
  390.     kDETKillerName                = 1;
  391.  
  392. {
  393.  ************************************ Forwarders 
  394.  
  395.    Forwarders include the following as well:
  396.  
  397.      Type    Offset                        Description
  398.      ----    ------                        -----------
  399.     'detf'    0                            Identifies the type of resource; see below for details on the contents
  400.     'rst#'    kDETForwarderTemplateNames    Contains a list of names of templates to forward to
  401.  
  402. }
  403.     kDETForwarderTemplateNames    = 4;
  404.  
  405. { ********************************************************************************* }
  406. { ******************************** Code Resources: ******************************** }
  407. { ********************************************************************************* }
  408. {  Target specification:  }
  409.     kDETSelf                    = 0;                            {  The "current" item  }
  410.     kDETSelfOtherAspect            = 1;                            {  Another aspect of the current item  }
  411.     kDETParent                    = 2;                            {  The parent (i.e., the aspect we're in the sublist of, if any) of the current item  }
  412.     kDETSublistItem                = 3;                            {  The itemNumberth item in the sublist  }
  413.     kDETSelectedSublistItem        = 4;                            {  The itemNumberth selected item in the sublist  }
  414.     kDETDSSpec                    = 5;                            {  The item specified by the packed DSSpec  }
  415.     kDETAspectTemplate            = 6;                            {  A specific aspect template (number itemNumber)  }
  416.     kDETInfoPageTemplate        = 7;                            {  A specific info-page template (number itemNumber) * Force type to be short  }
  417.     kDETHighSelector            = $F000;
  418.  
  419.  
  420. TYPE
  421.     DETTargetSelector                    = LONGINT;
  422.     DETTargetSpecificationPtr = ^DETTargetSpecification;
  423.     DETTargetSpecification = RECORD
  424.         selector:                DETTargetSelector;                        {  Target selection method (see above)  }
  425.         aspectName:                RStringPtr;                                {  The name of the aspect (kDETSelfOtherAspect, kDETSublistItem, }
  426.                                                                         {    kDETSelectedSublistItem, kDETDSSpec); nil for main aspect or none;  }
  427.                                                                         {   always filled in for calls if there is an aspect, even if it's the main aspect  }
  428.         itemNumber:                LONGINT;                                {  Sublist index (kDETSublistItem & kDETSelectedSublistItem & kDETAspectTemplate); }
  429.                                                                         {    1-based indexing  }
  430.         dsSpec:                    PackedDSSpecPtr;                        {  DSSpec (kDETDSSpec only)  }
  431.     END;
  432.  
  433. {
  434.  Code resource calls and call-backs both return an OSType:
  435.         kDETDidNotHandle (1)    = used by template to say "I didn't handle it" (for calls only)
  436.         noErr                    = function completed successfully
  437.         any error                = function failed, and here's why
  438. }
  439. {
  440.  Call-back functions:
  441.  
  442.         reqFunction                            Action
  443.         -----------                            ------
  444.         kDETcmdBeep                            Call SysBeep; useful for testing that a code resource's calls/call-backs are working at all
  445.  
  446.         kDETcmdBusy                            Put up watch cursor and switch processes; user events elicit a beep
  447.  
  448.         kDETcmdChangeCallFors                Change call-fors mask
  449.  
  450.         kDETcmdGetCommandSelectionCount        Get the command selection count (for calls which have a command selection list)
  451.         kDETcmdGetCommandItemN                Get command selection item n (for calls which have a command selection list)
  452.  
  453.         kDETcmdOpenDSSpec                    PackedDSSpec open (can also be done via AppleEvents -- this is a short-cut)
  454.  
  455.         kDETcmdAboutToTalk                    About to talk to user: bring us to front, disable watch cursor, etc.
  456.  
  457.         kDETcmdUnloadTemplates                Flush templates
  458.  
  459.         kDETcmdTemplateCounts                Return number of aspect and info-page templates in system
  460.  
  461.         kDETcmdGetDSSpec                    Get the PackedDSSpec for this object
  462.  
  463.         kDETcmdSublistCount                    Return the count of the sublist items
  464.         kDETcmdSelectedSublistCount            Return the count of the selected sublist items
  465.  
  466.         kDETcmdRequestSync                    Request a sync-up of the aspect with the catalog
  467.  
  468.         kDETcmdBreakAttribute                Break an attribute -- apply all applicable patterns to an attribute to generate properties
  469.  
  470.         kDETcmdGetTemplateFSSpec            Get the FSSpec of the file containing the template
  471.  
  472.         kDETcmdGetOpenEdit                    Return the property of the view being edited (or kDETNoProperty if none)
  473.         kDETcmdCloseEdit                    Close the current edit
  474.  
  475.         kDETcmdGetPropertyType                Get a property type
  476.  
  477.         kDETcmdGetPropertyNumber            Get a property, number format
  478.         kDETcmdGetPropertyRString            Get a property, RString format
  479.         kDETcmdGetPropertyBinarySize        Get a property, binary, return size
  480.         kDETcmdGetPropertyBinary            Get a property, binary format
  481.  
  482.         kDETcmdGetPropertyChanged            Get a property changed flag
  483.         kDETcmdGetPropertyEditable            Get a property editable flag
  484.  
  485.         kDETcmdSetPropertyType                Set a property type
  486.  
  487.         kDETcmdSetPropertyNumber            Set a property, number format
  488.         kDETcmdSetPropertyRString            Set a property, RString format
  489.         kDETcmdSetPropertyBinary            Set a property, binary data & size
  490.  
  491.         kDETcmdSetPropertyChanged            Set a property changed flag
  492.         kDETcmdSetPropertyEditable            Set a property editable flag
  493.  
  494.         kDETcmdDirtyProperty                Dirty a property (notify other code resources of change)
  495.  
  496.         kDETcmdDoPropertyCommand            Issue a property command
  497.  
  498.         kDETcmdAddMenu                        Add to the end of a dynamic menu
  499.         kDETcmdRemoveMenu                    Remove a dynamic menu item
  500.         kDETcmdMenuItemRString                Get a dynamic menu item RString
  501.  
  502.         kDETcmdSaveProperty                    Force a save of a property -- apply all applicable patterns to write out the property
  503.  
  504.         kDETcmdGetCustomViewUserReference    Get custom view user reference (as given in .r file)
  505.         kDETcmdGetCustomViewBounds            Get custom view current bounds
  506.  
  507.         kDETcmdGetResource                    Get a resource from a template
  508. }
  509.  
  510. CONST
  511.     kDETcmdSimpleCallback        = 0;
  512.     kDETcmdBeep                    = 1;
  513.     kDETcmdBusy                    = 2;
  514.     kDETcmdChangeCallFors        = 3;
  515.     kDETcmdGetCommandSelectionCount = 4;
  516.     kDETcmdGetCommandItemN        = 5;
  517.     kDETcmdOpenDSSpec            = 6;
  518.     kDETcmdAboutToTalk            = 7;
  519.     kDETcmdUnloadTemplates        = 8;
  520.     kDETcmdTemplateCounts        = 9;
  521.     kDETcmdTargetedCallback        = 1000;
  522.     kDETcmdGetDSSpec            = 1001;
  523.     kDETcmdSublistCount            = 1002;
  524.     kDETcmdSelectedSublistCount    = 1003;
  525.     kDETcmdRequestSync            = 1004;
  526.     kDETcmdBreakAttribute        = 1005;
  527.     kDETcmdGetTemplateFSSpec    = 1006;
  528.     kDETcmdGetOpenEdit            = 1007;
  529.     kDETcmdCloseEdit            = 1008;
  530.     kDETcmdPropertyCallback        = 2000;
  531.     kDETcmdGetPropertyType        = 2001;
  532.     kDETcmdGetPropertyNumber    = 2002;
  533.     kDETcmdGetPropertyRString    = 2003;
  534.     kDETcmdGetPropertyBinarySize = 2004;
  535.     kDETcmdGetPropertyBinary    = 2005;
  536.     kDETcmdGetPropertyChanged    = 2006;
  537.     kDETcmdGetPropertyEditable    = 2007;
  538.     kDETcmdSetPropertyType        = 2008;
  539.     kDETcmdSetPropertyNumber    = 2009;
  540.     kDETcmdSetPropertyRString    = 2010;
  541.     kDETcmdSetPropertyBinary    = 2011;
  542.     kDETcmdSetPropertyChanged    = 2012;
  543.     kDETcmdSetPropertyEditable    = 2013;
  544.     kDETcmdDirtyProperty        = 2014;
  545.     kDETcmdDoPropertyCommand    = 2015;
  546.     kDETcmdAddMenu                = 2016;
  547.     kDETcmdRemoveMenu            = 2017;
  548.     kDETcmdMenuItemRString        = 2018;
  549.     kDETcmdSaveProperty            = 2019;
  550.     kDETcmdGetCustomViewUserReference = 2020;
  551.     kDETcmdGetCustomViewBounds    = 2021;
  552.     kDETcmdGetResource            = 2022;                            {  Force type to be long  }
  553.     kDETcmdHighCallback            = $F0000000;
  554.  
  555.  
  556. TYPE
  557.     DETCallBackFunctions                = LONGINT;
  558. {
  559.  Call functions:
  560.  
  561.         reqFunction                        Action
  562.         -----------                        ------
  563.         kDETcmdInit                        Called once when template is first loaded (good time to allocate private data); returns call-for list
  564.         kDETcmdExit                        Called once when template is freed (good time to free private data)
  565.  
  566.         kDETcmdAttributeCreation        New sublist attribute creation about to occur; this gives the template a chance to modify
  567.                                         the value that's about to be created; sent to the template that will be used for
  568.                                         the main aspect of the new entry
  569.  
  570.         kDETcmdDynamicForwarders        Return a list of dynamically created forwarders
  571.  
  572.         kDETcmdInstanceInit                Called once when instance of template is started (good time to allocate private instance data)
  573.         kDETcmdInstanceExit                Called once when instance is ended (good time to free private instance data)
  574.  
  575.         kDETcmdIdle                        Called periodically during idle times
  576.  
  577.         kDETcmdViewListChanged            Called when the info-page view-list (list of enabled views) has changed
  578.  
  579.         kDETcmdValidateSave                Validate save: about to save info-page, return noErr (or kDETDidNotHandle) if it's OK to do so
  580.  
  581.         kDETcmdDropQuery                Drop query: return the appropriate operation for this drag; ask destination
  582.         kDETcmdDropMeQuery                Drop query: return the appropriate operation for this drag; ask dropee
  583.  
  584.         kDETcmdAttributeNew                Attribute value new (return kDETDidNotHandle to let normal new processing occur)
  585.         kDETcmdAttributeChange            Attribute value change (return kDETDidNotHandle to let normal change processing occur)
  586.         kDETcmdAttributeDelete            Attribute value delete (return kDETDidNotHandle to let normal deletion occur); sent to the
  587.                                         main aspect of the attribute that's about to be deleted
  588.         kDETcmdItemNew                    Target item (record or attribute) has just been created
  589.  
  590.         kDETcmdOpenSelf                    Self open (return noErr to prevent opening; return kDETDidNotHandle to allow it)
  591.  
  592.         kDETcmdDynamicResource            Return a dynamically created resource
  593.  
  594.         kDETcmdShouldSync                Check if the code resource wants to force a sync (update data from catalog)
  595.         kDETcmdDoSync                    Give code resource a chance to sync (read in and break all attributes)
  596.  
  597.         kDETcmdPropertyCommand            Command received in the property number range (usually means a button's been pushed)
  598.  
  599.         kDETcmdMaximumTextLength        Return maximum size for text form of property
  600.  
  601.         kDETcmdPropertyDirtied            Property dirtied, need to redraw
  602.  
  603.         kDETcmdPatternIn                Custom pattern element encountered on reading in an attribute
  604.         kDETcmdPatternOut                Custom pattern element encountered on writing out an attribute
  605.  
  606.         kDETcmdConvertToNumber            Convert from template-defined property type to number
  607.         kDETcmdConvertToRString            Convert from template-defined property type to RString
  608.         kDETcmdConvertFromNumber        Convert from number to template-defined property type
  609.         kDETcmdConvertFromRString        Convert from RString to template-defined property type
  610.  
  611.         kDETcmdCustomViewDraw            Custom view draw
  612.         kDETcmdCustomViewMouseDown        Custom view mouse down
  613.  
  614.         kDETcmdKeyPress                    Key press (used primarily to filter entry into EditText views)
  615.         kDETcmdPaste                    Paste (used primarily to filter entry into EditText views)
  616.  
  617.         kDETcmdCustomMenuSelected        Custom Catalogs menu selected
  618.         kDETcmdCustomMenuEnabled        Return whether custom Catalogs menu entry should be enabled
  619. }
  620.  
  621. CONST
  622.     kDETcmdSimpleCall            = 0;
  623.     kDETcmdInit                    = 1;
  624.     kDETcmdExit                    = 2;
  625.     kDETcmdAttributeCreation    = 3;
  626.     kDETcmdDynamicForwarders    = 4;
  627.     kDETcmdTargetedCall            = 1000;
  628.     kDETcmdInstanceInit            = 1001;
  629.     kDETcmdInstanceExit            = 1002;
  630.     kDETcmdIdle                    = 1003;
  631.     kDETcmdViewListChanged        = 1004;
  632.     kDETcmdValidateSave            = 1005;
  633.     kDETcmdDropQuery            = 1006;
  634.     kDETcmdDropMeQuery            = 1007;
  635.     kDETcmdAttributeNew            = 1008;
  636.     kDETcmdAttributeChange        = 1009;
  637.     kDETcmdAttributeDelete        = 1010;
  638.     kDETcmdItemNew                = 1011;
  639.     kDETcmdOpenSelf                = 1012;
  640.     kDETcmdDynamicResource        = 1013;
  641.     kDETcmdShouldSync            = 1014;
  642.     kDETcmdDoSync                = 1015;
  643.     kDETcmdPropertyCall            = 2000;
  644.     kDETcmdPropertyCommand        = 2001;
  645.     kDETcmdMaximumTextLength    = 2002;
  646.     kDETcmdPropertyDirtied        = 2003;
  647.     kDETcmdPatternIn            = 2004;
  648.     kDETcmdPatternOut            = 2005;
  649.     kDETcmdConvertToNumber        = 2006;
  650.     kDETcmdConvertToRString        = 2007;
  651.     kDETcmdConvertFromNumber    = 2008;
  652.     kDETcmdConvertFromRString    = 2009;
  653.     kDETcmdCustomViewDraw        = 2010;
  654.     kDETcmdCustomViewMouseDown    = 2011;
  655.     kDETcmdKeyPress                = 2012;
  656.     kDETcmdPaste                = 2013;
  657.     kDETcmdCustomMenuSelected    = 2014;
  658.     kDETcmdCustomMenuEnabled    = 2015;
  659.     kDETcmdHighCall                = $F0000000;                    {  Force the type to be long  }
  660.  
  661.  
  662. TYPE
  663.     DETCallFunctions                    = LONGINT;
  664. {  Valid commandIDs for DETDropQueryBlock and DETDropMeQueryBlock (in addition to property numbers):  }
  665.  
  666. CONST
  667.     kDETDoNothing                = 'xxx0';
  668.     kDETMove                    = 'move';
  669.     kDETDrag                    = 'drag';
  670.     kDETAlias                    = 'alis';
  671.  
  672.  
  673. TYPE
  674.     DETProtoCallBackBlockPtr = ^DETProtoCallBackBlock;
  675.     DETProtoCallBackBlock = RECORD
  676.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  677.         target:                    DETTargetSpecification;                    {  The target for the request  }
  678.         property:                INTEGER;                                {  The property to apply the request to  }
  679.     END;
  680.  
  681.     DETBeepBlockPtr = ^DETBeepBlock;
  682.     DETBeepBlock = RECORD
  683.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  684.     END;
  685.  
  686.     DETBusyBlockPtr = ^DETBusyBlock;
  687.     DETBusyBlock = RECORD
  688.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  689.     END;
  690.  
  691.     DETChangeCallForsBlockPtr = ^DETChangeCallForsBlock;
  692.     DETChangeCallForsBlock = RECORD
  693.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  694.         target:                    DETTargetSpecification;                    {  The target for the request  }
  695.         newCallFors:            LONGINT;                                {   -> New call-for mask  }
  696.     END;
  697.  
  698.     DETGetCommandSelectionCountBlockPtr = ^DETGetCommandSelectionCountBlock;
  699.     DETGetCommandSelectionCountBlock = RECORD
  700.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  701.         count:                    LONGINT;                                {  <-  The number of items in the command selection list  }
  702.     END;
  703.  
  704.  
  705. CONST
  706.     kDETHFSType                    = 0;                            {  HFS item type  }
  707.     kDETDSType                    = 1;                            {  Catalog Service item type  }
  708.     kDETMailType                = 2;                            {  Mail (letter) item type  }
  709.     kDETMoverType                = 3;                            {  Sounds, fonts, etc., from inside a suitcase or system file  }
  710.     kDETLastItemType            = $F0000000;                    {  Force it to be a long (C & C++ seem to disagree about the definition of 0xF000)  }
  711.  
  712.  
  713. TYPE
  714.     DETItemType                            = LONGINT;
  715. {  FSSpec plus possibly interesting additional info  }
  716.     DETFSInfoPtr = ^DETFSInfo;
  717.     DETFSInfo = RECORD
  718.         fileType:                OSType;                                    {  File type  }
  719.         fileCreator:            OSType;                                    {  File creator  }
  720.         fdFlags:                INTEGER;                                {  Finder flags  }
  721.         fsSpec:                    FSSpec;                                    {  FSSpec  }
  722.     END;
  723.  
  724.     DSRecPtr = ^DSRec;
  725.     DSRec = RECORD
  726.         dsSpec:                    ^PackedDSSpecPtr;                        {  <-  DSSpec for item (caller must DisposHandle() when done)  }
  727.         refNum:                    INTEGER;                                {  <-  Refnum for returned address  }
  728.         identity:                AuthIdentity;                            {  <-  Identity for returned address  }
  729.     END;
  730.  
  731.     ItemRecPtr = ^ItemRec;
  732.     ItemRec = RECORD
  733.         CASE INTEGER OF
  734.         0: (
  735.             fsInfo:                ^DETFSInfoPtr;                            {  <-  FSSpec & info for item (caller must DisposHandle() when done)  }
  736.             );
  737.         1: (
  738.             ds:                    DSRec;
  739.             );
  740.         2: (
  741.             dsSpec:                ^PackedDSSpecPtr;                        {  <-  DSSpec for item (caller must DisposHandle() when done)  }
  742.             );
  743.         3: (
  744.             ltrSpec:            ^LetterSpecPtr;                            {  <-  Letter spec for item (caller must DisposHandle() when done)  }
  745.             );
  746.     END;
  747.  
  748.     DETGetCommandItemNBlockPtr = ^DETGetCommandItemNBlock;
  749.     DETGetCommandItemNBlock = RECORD
  750.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  751.         itemNumber:                LONGINT;                                {   -> Item number to retrieve (1-based)  }
  752.         itemType:                DETItemType;                            {   -> Type of item to be returned (if we can interpret it as such)  }
  753.         item:                    ItemRec;
  754.     END;
  755.  
  756.     DETGetDSSpecBlockPtr = ^DETGetDSSpecBlock;
  757.     DETGetDSSpecBlock = RECORD
  758.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  759.         target:                    DETTargetSpecification;                    {  The target for the request  }
  760.         dsSpec:                    ^PackedDSSpecPtr;                        {  <-  Handle with result (caller must DisposHandle() when done)  }
  761.         refNum:                    INTEGER;                                {  <-  Refnum for address if PD  }
  762.         identity:                AuthIdentity;                            {  <-  Identity for address  }
  763.         isAlias:                BOOLEAN;                                {  <-  True if this entry is an alias  }
  764.         isRecordRef:            BOOLEAN;                                {  <-  True if this entry is a record reference (reserved)  }
  765.     END;
  766.  
  767.     DETGetTemplateFSSpecBlockPtr = ^DETGetTemplateFSSpecBlock;
  768.     DETGetTemplateFSSpecBlock = RECORD
  769.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  770.         target:                    DETTargetSpecification;                    {  The target for the request  }
  771.         fsSpec:                    FSSpec;                                    {  <-  FSSpec of template file  }
  772.         baseID:                    INTEGER;                                {  <-  Base ID of this template  }
  773.         aspectTemplateNumber:    LONGINT;                                {  <-  The template number for this aspect template  }
  774.     END;
  775.  
  776.     DETGetOpenEditBlockPtr = ^DETGetOpenEditBlock;
  777.     DETGetOpenEditBlock = RECORD
  778.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  779.         target:                    DETTargetSpecification;                    {  The target for the request  }
  780.         viewProperty:            INTEGER;                                {  <-  The property of the view being edited (or kNoProperty if none)  }
  781.     END;
  782.  
  783.     DETCloseEditBlockPtr = ^DETCloseEditBlock;
  784.     DETCloseEditBlock = RECORD
  785.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  786.         target:                    DETTargetSpecification;                    {  The target for the request  }
  787.     END;
  788.  
  789.     DETGetPropertyTypeBlockPtr = ^DETGetPropertyTypeBlock;
  790.     DETGetPropertyTypeBlock = RECORD
  791.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  792.         target:                    DETTargetSpecification;                    {  The target for the request  }
  793.         property:                INTEGER;                                {  The property to apply the request to  }
  794.         propertyType:            INTEGER;                                {  <-  The type of the property  }
  795.     END;
  796.  
  797.     DETGetPropertyNumberBlockPtr = ^DETGetPropertyNumberBlock;
  798.     DETGetPropertyNumberBlock = RECORD
  799.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  800.         target:                    DETTargetSpecification;                    {  The target for the request  }
  801.         property:                INTEGER;                                {  The property to apply the request to  }
  802.         propertyValue:            LONGINT;                                {  <-  The value of the property  }
  803.     END;
  804.  
  805.     DETGetPropertyRStringBlockPtr = ^DETGetPropertyRStringBlock;
  806.     DETGetPropertyRStringBlock = RECORD
  807.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  808.         target:                    DETTargetSpecification;                    {  The target for the request  }
  809.         property:                INTEGER;                                {  The property to apply the request to  }
  810.         propertyValue:            RStringHandle;                            {  <-  A handle containing the property (as an RString) (caller must DisposHandle() when done)  }
  811.     END;
  812.  
  813.     DETGetPropertyBinarySizeBlockPtr = ^DETGetPropertyBinarySizeBlock;
  814.     DETGetPropertyBinarySizeBlock = RECORD
  815.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  816.         target:                    DETTargetSpecification;                    {  The target for the request  }
  817.         property:                INTEGER;                                {  The property to apply the request to  }
  818.         propertyBinarySize:        LONGINT;                                {  <-  The size of the property as a binary block  }
  819.     END;
  820.  
  821.     DETGetPropertyBinaryBlockPtr = ^DETGetPropertyBinaryBlock;
  822.     DETGetPropertyBinaryBlock = RECORD
  823.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  824.         target:                    DETTargetSpecification;                    {  The target for the request  }
  825.         property:                INTEGER;                                {  The property to apply the request to  }
  826.         propertyValue:            Handle;                                    {  <-  Handle with the value of the property (caller must DisposHandle() when done)  }
  827.     END;
  828.  
  829.     DETGetPropertyChangedBlockPtr = ^DETGetPropertyChangedBlock;
  830.     DETGetPropertyChangedBlock = RECORD
  831.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  832.         target:                    DETTargetSpecification;                    {  The target for the request  }
  833.         property:                INTEGER;                                {  The property to apply the request to  }
  834.         propertyChanged:        BOOLEAN;                                {  <-  True if the property is marked as changed  }
  835.         filler1:                BOOLEAN;
  836.     END;
  837.  
  838.     DETGetPropertyEditableBlockPtr = ^DETGetPropertyEditableBlock;
  839.     DETGetPropertyEditableBlock = RECORD
  840.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  841.         target:                    DETTargetSpecification;                    {  The target for the request  }
  842.         property:                INTEGER;                                {  The property to apply the request to  }
  843.         propertyEditable:        BOOLEAN;                                {  <-  True if the property can be edited by the user (if false, view will appear disabled)  }
  844.         filler1:                BOOLEAN;
  845.     END;
  846.  
  847.     DETSetPropertyTypeBlockPtr = ^DETSetPropertyTypeBlock;
  848.     DETSetPropertyTypeBlock = RECORD
  849.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  850.         target:                    DETTargetSpecification;                    {  The target for the request  }
  851.         property:                INTEGER;                                {  The property to apply the request to  }
  852.         newType:                INTEGER;                                {   -> New type for property (just sets type, does not convert contents)  }
  853.     END;
  854.  
  855.     DETSetPropertyNumberBlockPtr = ^DETSetPropertyNumberBlock;
  856.     DETSetPropertyNumberBlock = RECORD
  857.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  858.         target:                    DETTargetSpecification;                    {  The target for the request  }
  859.         property:                INTEGER;                                {  The property to apply the request to  }
  860.         newValue:                LONGINT;                                {   -> New value to set property to (and set type to number)  }
  861.     END;
  862.  
  863.     DETSetPropertyRStringBlockPtr = ^DETSetPropertyRStringBlock;
  864.     DETSetPropertyRStringBlock = RECORD
  865.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  866.         target:                    DETTargetSpecification;                    {  The target for the request  }
  867.         property:                INTEGER;                                {  The property to apply the request to  }
  868.         newValue:                RStringPtr;                                {   -> New value to set property to (and set type to RString)  }
  869.     END;
  870.  
  871.     DETSetPropertyBinaryBlockPtr = ^DETSetPropertyBinaryBlock;
  872.     DETSetPropertyBinaryBlock = RECORD
  873.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  874.         target:                    DETTargetSpecification;                    {  The target for the request  }
  875.         property:                INTEGER;                                {  The property to apply the request to  }
  876.         newValue:                Ptr;                                    {   -> New value to set property to (and set type to binary)  }
  877.         newValueSize:            LONGINT;                                {   -> Size of new value  }
  878.     END;
  879.  
  880.     DETSetPropertyChangedBlockPtr = ^DETSetPropertyChangedBlock;
  881.     DETSetPropertyChangedBlock = RECORD
  882.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  883.         target:                    DETTargetSpecification;                    {  The target for the request  }
  884.         property:                INTEGER;                                {  The property to apply the request to  }
  885.         propertyChanged:        BOOLEAN;                                {   -> Value to set changed flag on property to  }
  886.         filler1:                BOOLEAN;
  887.     END;
  888.  
  889.     DETSetPropertyEditableBlockPtr = ^DETSetPropertyEditableBlock;
  890.     DETSetPropertyEditableBlock = RECORD
  891.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  892.         target:                    DETTargetSpecification;                    {  The target for the request  }
  893.         property:                INTEGER;                                {  The property to apply the request to  }
  894.         propertyEditable:        BOOLEAN;                                {   -> Value to set editable flag on property to  }
  895.         filler1:                BOOLEAN;
  896.     END;
  897.  
  898.     DETDirtyPropertyBlockPtr = ^DETDirtyPropertyBlock;
  899.     DETDirtyPropertyBlock = RECORD
  900.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  901.         target:                    DETTargetSpecification;                    {  The target for the request  }
  902.         property:                INTEGER;                                {  The property to apply the request to  }
  903.     END;
  904.  
  905.     DETDoPropertyCommandBlockPtr = ^DETDoPropertyCommandBlock;
  906.     DETDoPropertyCommandBlock = RECORD
  907.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  908.         target:                    DETTargetSpecification;                    {  The target for the request  }
  909.         property:                INTEGER;                                {  The property to apply the request to  }
  910.         parameter:                LONGINT;                                {  ->  Parameter of command  }
  911.     END;
  912.  
  913.     DETSublistCountBlockPtr = ^DETSublistCountBlock;
  914.     DETSublistCountBlock = RECORD
  915.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  916.         target:                    DETTargetSpecification;                    {  The target for the request  }
  917.         count:                    LONGINT;                                {  <-  The number of items in the current item's sublist  }
  918.     END;
  919.  
  920.     DETSelectedSublistCountBlockPtr = ^DETSelectedSublistCountBlock;
  921.     DETSelectedSublistCountBlock = RECORD
  922.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  923.         target:                    DETTargetSpecification;                    {  The target for the request  }
  924.         count:                    LONGINT;                                {  <-  The number of selected items in the current item's sublist  }
  925.     END;
  926.  
  927.     DETRequestSyncBlockPtr = ^DETRequestSyncBlock;
  928.     DETRequestSyncBlock = RECORD
  929.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  930.         target:                    DETTargetSpecification;                    {  The target for the request  }
  931.     END;
  932.  
  933.     DETAddMenuBlockPtr = ^DETAddMenuBlock;
  934.     DETAddMenuBlock = RECORD
  935.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  936.         target:                    DETTargetSpecification;                    {  The target for the request  }
  937.         property:                INTEGER;                                {  The property to apply the request to  }
  938.         name:                    RStringPtr;                                {   -> Name of new menu item  }
  939.         parameter:                LONGINT;                                {   -> Parameter to return when this item is selected  }
  940.         addAfter:                LONGINT;                                {   -> Parameter of entry to add after, or -1 for add at end  }
  941.     END;
  942.  
  943.     DETRemoveMenuBlockPtr = ^DETRemoveMenuBlock;
  944.     DETRemoveMenuBlock = RECORD
  945.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  946.         target:                    DETTargetSpecification;                    {  The target for the request  }
  947.         property:                INTEGER;                                {  The property to apply the request to  }
  948.         itemToRemove:            LONGINT;                                {   -> Parameter of menu item to remove  }
  949.     END;
  950.  
  951.     DETMenuItemRStringBlockPtr = ^DETMenuItemRStringBlock;
  952.     DETMenuItemRStringBlock = RECORD
  953.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  954.         target:                    DETTargetSpecification;                    {  The target for the request  }
  955.         property:                INTEGER;                                {  The property to apply the request to  }
  956.         itemParameter:            LONGINT;                                {   -> Parameter of menu item to return string for  }
  957.         rString:                RStringHandle;                            {  <-  Handle with the RString (caller must DisposHandle() when done)  }
  958.     END;
  959.  
  960.     DETOpenDSSpecBlockPtr = ^DETOpenDSSpecBlock;
  961.     DETOpenDSSpecBlock = RECORD
  962.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  963.         dsSpec:                    PackedDSSpecPtr;                        {   -> DSSpec of object to be opened  }
  964.     END;
  965.  
  966.     DETAboutToTalkBlockPtr = ^DETAboutToTalkBlock;
  967.     DETAboutToTalkBlock = RECORD
  968.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  969.     END;
  970.  
  971.     DETBreakAttributeBlockPtr = ^DETBreakAttributeBlock;
  972.     DETBreakAttributeBlock = RECORD
  973.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  974.         target:                    DETTargetSpecification;                    {  The target for the request  }
  975.         breakAttribute:            AttributePtr;                            {   -> Attribute to parse  }
  976.         isChangeable:            BOOLEAN;                                {   -> True if the value can be changed by the user  }
  977.         filler1:                BOOLEAN;
  978.     END;
  979.  
  980.     DETSavePropertyBlockPtr = ^DETSavePropertyBlock;
  981.     DETSavePropertyBlock = RECORD
  982.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  983.         target:                    DETTargetSpecification;                    {  The target for the request  }
  984.         property:                INTEGER;                                {  The property to apply the request to  }
  985.     END;
  986.  
  987.     DETGetCustomViewUserReferenceBlockPtr = ^DETGetCustomViewUserReferenceBlock;
  988.     DETGetCustomViewUserReferenceBlock = RECORD
  989.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  990.         target:                    DETTargetSpecification;                    {  The target for the request  }
  991.         property:                INTEGER;                                {  The property to apply the request to  }
  992.         userReference:            INTEGER;                                {  <-  User reference value, as specified in the .r file  }
  993.     END;
  994.  
  995.     DETGetCustomViewBoundsBlockPtr = ^DETGetCustomViewBoundsBlock;
  996.     DETGetCustomViewBoundsBlock = RECORD
  997.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  998.         target:                    DETTargetSpecification;                    {  The target for the request  }
  999.         property:                INTEGER;                                {  The property to apply the request to  }
  1000.         bounds:                    Rect;                                    {  <-  Bounds of the view  }
  1001.     END;
  1002.  
  1003.     DETGetResourceBlockPtr = ^DETGetResourceBlock;
  1004.     DETGetResourceBlock = RECORD
  1005.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  1006.         target:                    DETTargetSpecification;                    {  The target for the request  }
  1007.         property:                INTEGER;                                {  The property to apply the request to  }
  1008.         resourceType:            ResType;                                {   -> Resource type  }
  1009.         theResource:            Handle;                                    {  <-  The resource handle (caller must dispose when done)  }
  1010.     END;
  1011.  
  1012.     DETTemplateCountsPtr = ^DETTemplateCounts;
  1013.     DETTemplateCounts = RECORD
  1014.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  1015.         aspectTemplateCount:    LONGINT;                                {  <-  Number of aspect templates in the system  }
  1016.         infoPageTemplateCount:    LONGINT;                                {  <-  Number of info-page templates in the system  }
  1017.     END;
  1018.  
  1019.     DETUnloadTemplatesBlockPtr = ^DETUnloadTemplatesBlock;
  1020.     DETUnloadTemplatesBlock = RECORD
  1021.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  1022.     END;
  1023.  
  1024.     DETCallBackBlockPtr = ^DETCallBackBlock;
  1025.     DETCallBackBlock = RECORD
  1026.         CASE INTEGER OF
  1027.         0: (
  1028.             protoCallBack:        DETProtoCallBackBlock;
  1029.             );
  1030.         1: (
  1031.             beep:                DETBeepBlock;
  1032.             );
  1033.         2: (
  1034.             busy:                DETBusyBlock;
  1035.             );
  1036.         3: (
  1037.             changeCallFors:        DETChangeCallForsBlock;
  1038.             );
  1039.         4: (
  1040.             getCommandSelectionCount: DETGetCommandSelectionCountBlock;
  1041.             );
  1042.         5: (
  1043.             getCommandItemN:    DETGetCommandItemNBlock;
  1044.             );
  1045.         6: (
  1046.             getDSSpec:            DETGetDSSpecBlock;
  1047.             );
  1048.         7: (
  1049.             getTemplateFSSpec:    DETGetTemplateFSSpecBlock;
  1050.             );
  1051.         8: (
  1052.             getOpenEdit:        DETGetOpenEditBlock;
  1053.             );
  1054.         9: (
  1055.             closeEdit:            DETCloseEditBlock;
  1056.             );
  1057.         10: (
  1058.             getPropertyType:    DETGetPropertyTypeBlock;
  1059.             );
  1060.         11: (
  1061.             getPropertyNumber:    DETGetPropertyNumberBlock;
  1062.             );
  1063.         12: (
  1064.             getPropertyRString:    DETGetPropertyRStringBlock;
  1065.             );
  1066.         13: (
  1067.             getPropertyBinarySize: DETGetPropertyBinarySizeBlock;
  1068.             );
  1069.         14: (
  1070.             getPropertyBinary:    DETGetPropertyBinaryBlock;
  1071.             );
  1072.         15: (
  1073.             getPropertyChanged:    DETGetPropertyChangedBlock;
  1074.             );
  1075.         16: (
  1076.             getPropertyEditable: DETGetPropertyEditableBlock;
  1077.             );
  1078.         17: (
  1079.             setPropertyType:    DETSetPropertyTypeBlock;
  1080.             );
  1081.         18: (
  1082.             setPropertyNumber:    DETSetPropertyNumberBlock;
  1083.             );
  1084.         19: (
  1085.             setPropertyRString:    DETSetPropertyRStringBlock;
  1086.             );
  1087.         20: (
  1088.             setPropertyBinary:    DETSetPropertyBinaryBlock;
  1089.             );
  1090.         21: (
  1091.             setPropertyChanged:    DETSetPropertyChangedBlock;
  1092.             );
  1093.         22: (
  1094.             setPropertyEditable: DETSetPropertyEditableBlock;
  1095.             );
  1096.         23: (
  1097.             dirtyProperty:        DETDirtyPropertyBlock;
  1098.             );
  1099.         24: (
  1100.             doPropertyCommand:    DETDoPropertyCommandBlock;
  1101.             );
  1102.         25: (
  1103.             sublistCount:        DETSublistCountBlock;
  1104.             );
  1105.         26: (
  1106.             selectedSublistCount: DETSelectedSublistCountBlock;
  1107.             );
  1108.         27: (
  1109.             requestSync:        DETRequestSyncBlock;
  1110.             );
  1111.         28: (
  1112.             addMenu:            DETAddMenuBlock;
  1113.             );
  1114.         29: (
  1115.             removeMenu:            DETRemoveMenuBlock;
  1116.             );
  1117.         30: (
  1118.             menuItemRString:    DETMenuItemRStringBlock;
  1119.             );
  1120.         31: (
  1121.             openDSSpec:            DETOpenDSSpecBlock;
  1122.             );
  1123.         32: (
  1124.             aboutToTalk:        DETAboutToTalkBlock;
  1125.             );
  1126.         33: (
  1127.             breakAttribute:        DETBreakAttributeBlock;
  1128.             );
  1129.         34: (
  1130.             saveProperty:        DETSavePropertyBlock;
  1131.             );
  1132.         35: (
  1133.             getCustomViewUserReference: DETGetCustomViewUserReferenceBlock;
  1134.             );
  1135.         36: (
  1136.             getCustomViewBounds: DETGetCustomViewBoundsBlock;
  1137.             );
  1138.         37: (
  1139.             getResource:        DETGetResourceBlock;
  1140.             );
  1141.         38: (
  1142.             templateCounts:        DETTemplateCounts;
  1143.             );
  1144.         39: (
  1145.             unloadTemplates:    DETUnloadTemplatesBlock;
  1146.             );
  1147.     END;
  1148.  
  1149.     DETCallBlockPtr = ^DETCallBlock;
  1150.     DETCallBackProcPtr = ProcPtr;  { FUNCTION DETCallBack(VAR callBlockPtr: DETCallBlock; callBackBlockPtr: DETCallBackBlockPtr): OSErr; }
  1151.  
  1152.     DETCallBackUPP = UniversalProcPtr;
  1153.     DETCallBack                            = DETCallBackUPP;
  1154.     DETProtoCallBlockPtr = ^DETProtoCallBlock;
  1155.     DETProtoCallBlock = RECORD
  1156.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1157.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1158.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1159.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1160.                                                                         {     common to all invocations of code resource)  }
  1161.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1162.                                                                         {     code resource)  }
  1163.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1164.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1165.         filler1:                BOOLEAN;
  1166.         property:                INTEGER;                                {  The property number the call refers to  }
  1167.     END;
  1168.  
  1169.     DETInitBlockPtr = ^DETInitBlock;
  1170.     DETInitBlock = RECORD
  1171.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1172.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1173.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1174.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1175.         newCallFors:            LONGINT;                                {  <-  New call-for mask  }
  1176.     END;
  1177.  
  1178.     DETExitBlockPtr = ^DETExitBlock;
  1179.     DETExitBlock = RECORD
  1180.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1181.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1182.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1183.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1184.     END;
  1185.  
  1186.     DETInstanceInitBlockPtr = ^DETInstanceInitBlock;
  1187.     DETInstanceInitBlock = RECORD
  1188.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1189.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1190.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1191.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1192.                                                                         {     common to all invocations of code resource)  }
  1193.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1194.                                                                         {     code resource)  }
  1195.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1196.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1197.         filler1:                BOOLEAN;
  1198.     END;
  1199.  
  1200.     DETInstanceExitBlockPtr = ^DETInstanceExitBlock;
  1201.     DETInstanceExitBlock = RECORD
  1202.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1203.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1204.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1205.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1206.                                                                         {     common to all invocations of code resource)  }
  1207.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1208.                                                                         {     code resource)  }
  1209.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1210.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1211.         filler1:                BOOLEAN;
  1212.     END;
  1213.  
  1214.     DETInstanceIdleBlockPtr = ^DETInstanceIdleBlock;
  1215.     DETInstanceIdleBlock = RECORD
  1216.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1217.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1218.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1219.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1220.                                                                         {     common to all invocations of code resource)  }
  1221.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1222.                                                                         {     code resource)  }
  1223.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1224.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1225.         filler1:                BOOLEAN;
  1226.     END;
  1227.  
  1228.     DETPropertyCommandBlockPtr = ^DETPropertyCommandBlock;
  1229.     DETPropertyCommandBlock = RECORD
  1230.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1231.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1232.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1233.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1234.                                                                         {     common to all invocations of code resource)  }
  1235.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1236.                                                                         {     code resource)  }
  1237.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1238.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1239.         filler1:                BOOLEAN;
  1240.         property:                INTEGER;                                {  The property number the call refers to  }
  1241.         parameter:                LONGINT;                                {   -> Parameter of command  }
  1242.     END;
  1243.  
  1244.     DETMaximumTextLengthBlockPtr = ^DETMaximumTextLengthBlock;
  1245.     DETMaximumTextLengthBlock = RECORD
  1246.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1247.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1248.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1249.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1250.                                                                         {     common to all invocations of code resource)  }
  1251.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1252.                                                                         {     code resource)  }
  1253.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1254.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1255.         filler1:                BOOLEAN;
  1256.         property:                INTEGER;                                {  The property number the call refers to  }
  1257.         maxSize:                LONGINT;                                {  <-  Return the maximum number of characters the user can entry when property is edited in an EditText  }
  1258.     END;
  1259.  
  1260.     DETViewListChangedBlockPtr = ^DETViewListChangedBlock;
  1261.     DETViewListChangedBlock = RECORD
  1262.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1263.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1264.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1265.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1266.                                                                         {     common to all invocations of code resource)  }
  1267.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1268.                                                                         {     code resource)  }
  1269.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1270.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1271.         filler1:                BOOLEAN;
  1272.     END;
  1273.  
  1274.     DETPropertyDirtiedBlockPtr = ^DETPropertyDirtiedBlock;
  1275.     DETPropertyDirtiedBlock = RECORD
  1276.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1277.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1278.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1279.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1280.                                                                         {     common to all invocations of code resource)  }
  1281.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1282.                                                                         {     code resource)  }
  1283.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1284.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1285.         filler1:                BOOLEAN;
  1286.         property:                INTEGER;                                {  The property number the call refers to  }
  1287.     END;
  1288.  
  1289.     DETValidateSaveBlockPtr = ^DETValidateSaveBlock;
  1290.     DETValidateSaveBlock = RECORD
  1291.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1292.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1293.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1294.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1295.                                                                         {     common to all invocations of code resource)  }
  1296.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1297.                                                                         {     code resource)  }
  1298.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1299.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1300.         filler1:                BOOLEAN;
  1301.         errorString:            RStringHandle;                            {  <-  Handle with error string if validation fails (callee must allocate handle, DE will DisposHandle() it)  }
  1302.     END;
  1303.  
  1304.     DETDropQueryBlockPtr = ^DETDropQueryBlock;
  1305.     DETDropQueryBlock = RECORD
  1306.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1307.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1308.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1309.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1310.                                                                         {     common to all invocations of code resource)  }
  1311.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1312.                                                                         {     code resource)  }
  1313.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1314.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1315.         filler1:                BOOLEAN;
  1316.         modifiers:                INTEGER;                                {   -> Modifiers at drop time (option/control/command/shift keys)  }
  1317.         commandID:                LONGINT;                                {  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number)  }
  1318.         destinationType:        AttributeType;                            {  <-> Type to convert attribute to  }
  1319.         copyToHFS:                BOOLEAN;                                {  <-  If true, object should be copied to HFS before being operated on, and deleted after  }
  1320.         filler2:                BOOLEAN;
  1321.     END;
  1322.  
  1323.     DETDropMeQueryBlockPtr = ^DETDropMeQueryBlock;
  1324.     DETDropMeQueryBlock = RECORD
  1325.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1326.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1327.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1328.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1329.                                                                         {     common to all invocations of code resource)  }
  1330.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1331.                                                                         {     code resource)  }
  1332.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1333.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1334.         filler1:                BOOLEAN;
  1335.         modifiers:                INTEGER;                                {   -> Modifiers at drop time (option/control/command/shift keys)  }
  1336.         commandID:                LONGINT;                                {  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number)  }
  1337.         destinationType:        AttributeType;                            {  <-> Type to convert attribute to  }
  1338.         copyToHFS:                BOOLEAN;                                {  <-  If true, object should be copied to HFS before being operated on, and deleted after  }
  1339.         filler2:                BOOLEAN;
  1340.     END;
  1341.  
  1342.     DETAttributeCreationBlockPtr = ^DETAttributeCreationBlock;
  1343.     DETAttributeCreationBlock = RECORD
  1344.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1345.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1346.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1347.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1348.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1349.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1350.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1351.         attrType:                AttributeType;                            {  <-> The type of the attribute being created  }
  1352.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being created  }
  1353.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1354.     END;
  1355.  
  1356.     DETAttributeNewBlockPtr = ^DETAttributeNewBlock;
  1357.     DETAttributeNewBlock = RECORD
  1358.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1359.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1360.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1361.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1362.                                                                         {     common to all invocations of code resource)  }
  1363.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1364.                                                                         {     code resource)  }
  1365.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1366.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1367.         filler1:                BOOLEAN;
  1368.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1369.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1370.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1371.         attrType:                AttributeType;                            {  <-> The type of the attribute being created  }
  1372.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being created  }
  1373.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1374.     END;
  1375.  
  1376.     DETAttributeChangeBlockPtr = ^DETAttributeChangeBlock;
  1377.     DETAttributeChangeBlock = RECORD
  1378.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1379.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1380.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1381.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1382.                                                                         {     common to all invocations of code resource)  }
  1383.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1384.                                                                         {     code resource)  }
  1385.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1386.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1387.         filler1:                BOOLEAN;
  1388.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1389.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1390.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1391.         attrType:                AttributeType;                            {  <-> The type of the attribute being changed  }
  1392.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being changed  }
  1393.         attrCID:                AttributeCreationID;                    {  <-> The CID of the attribute being changed  }
  1394.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1395.     END;
  1396.  
  1397.     DETAttributeDeleteBlockPtr = ^DETAttributeDeleteBlock;
  1398.     DETAttributeDeleteBlock = RECORD
  1399.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1400.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1401.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1402.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1403.                                                                         {     common to all invocations of code resource)  }
  1404.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1405.                                                                         {     code resource)  }
  1406.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1407.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1408.         filler1:                BOOLEAN;
  1409.         dsSpec:                    PackedDSSpecPtr;                        {   -> The object which will be deleted  }
  1410.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1411.         identity:                AuthIdentity;                            {   -> The identity we're browsing as  }
  1412.     END;
  1413.  
  1414.     DETItemNewBlockPtr = ^DETItemNewBlock;
  1415.     DETItemNewBlock = RECORD
  1416.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1417.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1418.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1419.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1420.                                                                         {     common to all invocations of code resource)  }
  1421.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1422.                                                                         {     code resource)  }
  1423.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1424.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1425.         filler1:                BOOLEAN;
  1426.     END;
  1427.  
  1428.     DETShouldSyncBlockPtr = ^DETShouldSyncBlock;
  1429.     DETShouldSyncBlock = RECORD
  1430.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1431.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1432.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1433.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1434.                                                                         {     common to all invocations of code resource)  }
  1435.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1436.                                                                         {     code resource)  }
  1437.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1438.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1439.         filler1:                BOOLEAN;
  1440.         shouldSync:                BOOLEAN;                                {  <-  True if we should now sync with catalog  }
  1441.         filler2:                BOOLEAN;
  1442.     END;
  1443.  
  1444.     DETDoSyncBlockPtr = ^DETDoSyncBlock;
  1445.     DETDoSyncBlock = RECORD
  1446.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1447.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1448.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1449.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1450.                                                                         {     common to all invocations of code resource)  }
  1451.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1452.                                                                         {     code resource)  }
  1453.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1454.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1455.         filler1:                BOOLEAN;
  1456.     END;
  1457.  
  1458.     DETPatternInBlockPtr = ^DETPatternInBlock;
  1459.     DETPatternInBlock = RECORD
  1460.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1461.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1462.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1463.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1464.                                                                         {     common to all invocations of code resource)  }
  1465.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1466.                                                                         {     code resource)  }
  1467.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1468.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1469.         filler1:                BOOLEAN;
  1470.         property:                INTEGER;                                {  The property number the call refers to  }
  1471.         elementType:            LONGINT;                                {   -> Element type from pattern  }
  1472.         extra:                    LONGINT;                                {   -> Extra field from pattern  }
  1473.         attribute:                AttributePtr;                            {   -> The complete attribute  }
  1474.         dataOffset:                LONGINT;                                {  <-> Offset to current (next) byte  }
  1475.         bitOffset:                INTEGER;                                {  <-> Bit offset (next bit is *fData >> fBitOffset++)  }
  1476.     END;
  1477.  
  1478.     DETPatternOutBlockPtr = ^DETPatternOutBlock;
  1479.     DETPatternOutBlock = RECORD
  1480.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1481.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1482.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1483.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1484.                                                                         {     common to all invocations of code resource)  }
  1485.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1486.                                                                         {     code resource)  }
  1487.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1488.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1489.         filler1:                BOOLEAN;
  1490.         property:                INTEGER;                                {  The property number the call refers to  }
  1491.         elementType:            LONGINT;                                {   -> Element type from pattern  }
  1492.         extra:                    LONGINT;                                {   -> Extra field from pattern  }
  1493.         attribute:                AttributePtr;                            {   -> The attribute (minus the data portion)  }
  1494.         data:                    Handle;                                    {   -> Data to be written (pre-allocated, resize and add at end)  }
  1495.         dataOffset:                LONGINT;                                {  <-> Offset to next byte to write  }
  1496.         bitOffset:                INTEGER;                                {  <-> Bit offset (if zero, handle will need to be resized to one more byte before write)  }
  1497.     END;
  1498.  
  1499.     DETOpenSelfBlockPtr = ^DETOpenSelfBlock;
  1500.     DETOpenSelfBlock = RECORD
  1501.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1502.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1503.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1504.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1505.                                                                         {     common to all invocations of code resource)  }
  1506.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1507.                                                                         {     code resource)  }
  1508.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1509.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1510.         filler1:                BOOLEAN;
  1511.         modifiers:                INTEGER;                                {   -> Modifiers at open time (option/control/command/shift keys)  }
  1512.     END;
  1513.  
  1514.     DETConvertToNumberBlockPtr = ^DETConvertToNumberBlock;
  1515.     DETConvertToNumberBlock = RECORD
  1516.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1517.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1518.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1519.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1520.                                                                         {     common to all invocations of code resource)  }
  1521.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1522.                                                                         {     code resource)  }
  1523.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1524.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1525.         filler1:                BOOLEAN;
  1526.         property:                INTEGER;                                {  The property number the call refers to  }
  1527.         theValue:                LONGINT;                                {  <-  The converted value to return  }
  1528.     END;
  1529.  
  1530.     DETConvertToRStringBlockPtr = ^DETConvertToRStringBlock;
  1531.     DETConvertToRStringBlock = RECORD
  1532.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1533.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1534.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1535.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1536.                                                                         {     common to all invocations of code resource)  }
  1537.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1538.                                                                         {     code resource)  }
  1539.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1540.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1541.         filler1:                BOOLEAN;
  1542.         property:                INTEGER;                                {  The property number the call refers to  }
  1543.         theValue:                RStringHandle;                            {  <-  A handle with the converted value (callee must allocate handle, DE will DisposHandle() it)  }
  1544.     END;
  1545.  
  1546.     DETConvertFromNumberBlockPtr = ^DETConvertFromNumberBlock;
  1547.     DETConvertFromNumberBlock = RECORD
  1548.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1549.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1550.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1551.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1552.                                                                         {     common to all invocations of code resource)  }
  1553.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1554.                                                                         {     code resource)  }
  1555.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1556.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1557.         filler1:                BOOLEAN;
  1558.         property:                INTEGER;                                {  The property number the call refers to  }
  1559.         theValue:                LONGINT;                                {   -> The value to convert (result should be written direct to the property)  }
  1560.     END;
  1561.  
  1562.     DETConvertFromRStringBlockPtr = ^DETConvertFromRStringBlock;
  1563.     DETConvertFromRStringBlock = RECORD
  1564.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1565.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1566.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1567.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1568.                                                                         {     common to all invocations of code resource)  }
  1569.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1570.                                                                         {     code resource)  }
  1571.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1572.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1573.         filler1:                BOOLEAN;
  1574.         property:                INTEGER;                                {  The property number the call refers to  }
  1575.         theValue:                RStringPtr;                                {   -> The value to convert (result should be written direct to the property)  }
  1576.     END;
  1577.  
  1578.     DETCustomViewDrawBlockPtr = ^DETCustomViewDrawBlock;
  1579.     DETCustomViewDrawBlock = RECORD
  1580.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1581.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1582.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1583.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1584.                                                                         {     common to all invocations of code resource)  }
  1585.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1586.                                                                         {     code resource)  }
  1587.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1588.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1589.         filler1:                BOOLEAN;
  1590.         property:                INTEGER;                                {  The property number the call refers to  }
  1591.     END;
  1592.  
  1593.     DETCustomViewMouseDownBlockPtr = ^DETCustomViewMouseDownBlock;
  1594.     DETCustomViewMouseDownBlock = RECORD
  1595.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1596.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1597.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1598.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1599.                                                                         {     common to all invocations of code resource)  }
  1600.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1601.                                                                         {     code resource)  }
  1602.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1603.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1604.         filler1:                BOOLEAN;
  1605.         property:                INTEGER;                                {  The property number the call refers to  }
  1606.         theEvent:                EventRecordPtr;                            {   -> The original event record of the mouse-down  }
  1607.     END;
  1608.  
  1609.     DETKeyPressBlockPtr = ^DETKeyPressBlock;
  1610.     DETKeyPressBlock = RECORD
  1611.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1612.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1613.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1614.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1615.                                                                         {     common to all invocations of code resource)  }
  1616.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1617.                                                                         {     code resource)  }
  1618.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1619.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1620.         filler1:                BOOLEAN;
  1621.         property:                INTEGER;                                {  The property number the call refers to  }
  1622.         theEvent:                EventRecordPtr;                            {   -> The original event record of the key-press  }
  1623.     END;
  1624.  
  1625.     DETPasteBlockPtr = ^DETPasteBlock;
  1626.     DETPasteBlock = RECORD
  1627.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1628.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1629.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1630.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1631.                                                                         {     common to all invocations of code resource)  }
  1632.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1633.                                                                         {     code resource)  }
  1634.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1635.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1636.         filler1:                BOOLEAN;
  1637.         property:                INTEGER;                                {  The property number the call refers to  }
  1638.         modifiers:                INTEGER;                                {   -> Modifiers at paste time (option/control/command/shift keys)  }
  1639.     END;
  1640.  
  1641.     DETCustomMenuSelectedBlockPtr = ^DETCustomMenuSelectedBlock;
  1642.     DETCustomMenuSelectedBlock = RECORD
  1643.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1644.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1645.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1646.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1647.                                                                         {     common to all invocations of code resource)  }
  1648.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1649.                                                                         {     code resource)  }
  1650.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1651.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1652.         filler1:                BOOLEAN;
  1653.         menuTableParameter:        INTEGER;                                {   -> The "property" field from the custom menu table  }
  1654.     END;
  1655.  
  1656.     DETCustomMenuEnabledBlockPtr = ^DETCustomMenuEnabledBlock;
  1657.     DETCustomMenuEnabledBlock = RECORD
  1658.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1659.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1660.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1661.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1662.                                                                         {     common to all invocations of code resource)  }
  1663.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1664.                                                                         {     code resource)  }
  1665.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1666.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1667.         filler1:                BOOLEAN;
  1668.         menuTableParameter:        INTEGER;                                {   -> The "property" field from the custom menu table  }
  1669.         enable:                    BOOLEAN;                                {  <-  Whether to enable the menu item  }
  1670.         filler2:                BOOLEAN;
  1671.     END;
  1672.  
  1673.     DETForwarderListItemPtr = ^DETForwarderListItem;
  1674.     DETForwarderListItem = RECORD
  1675.         next:                    ^DETForwarderListItemPtr;                {  Pointer to next item, or nil  }
  1676.         attributeValueTag:        AttributeTag;                            {  Tag of new templates (0 for none)  }
  1677.         rstrs:                    PackedPathName;                            {  Record type (empty if none), attrbute type (empty if none),list of template names to forward to  }
  1678.     END;
  1679.  
  1680.     DETForwarderListPtr                    = ^DETForwarderListItem;
  1681.     DETForwarderListHandle                = ^DETForwarderListPtr;
  1682.     DETDynamicForwardersBlockPtr = ^DETDynamicForwardersBlock;
  1683.     DETDynamicForwardersBlock = RECORD
  1684.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1685.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1686.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1687.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1688.         forwarders:                DETForwarderListHandle;                    {  <-  List of forwaders  }
  1689.     END;
  1690.  
  1691.     DETDynamicResourceBlockPtr = ^DETDynamicResourceBlock;
  1692.     DETDynamicResourceBlock = RECORD
  1693.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1694.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1695.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1696.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1697.                                                                         {     common to all invocations of code resource)  }
  1698.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1699.                                                                         {     code resource)  }
  1700.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1701.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1702.         filler1:                BOOLEAN;
  1703.         resourceType:            ResType;                                {   -> The resource type being requested  }
  1704.         propertyNumber:            INTEGER;                                {   -> The property number of the resource being requested  }
  1705.         resourceID:                INTEGER;                                {   -> The resource ID (base ID + property number) of the resource  }
  1706.         theResource:            Handle;                                    {  <-  The requested resource  }
  1707.     END;
  1708.  
  1709.     DETCallBlock = RECORD
  1710.         CASE INTEGER OF
  1711.         0: (
  1712.             protoCall:            DETProtoCallBlock;
  1713.             );
  1714.         1: (
  1715.             init:                DETInitBlock;
  1716.             );
  1717.         2: (
  1718.             exit:                DETExitBlock;
  1719.             );
  1720.         3: (
  1721.             instanceInit:        DETInstanceInitBlock;
  1722.             );
  1723.         4: (
  1724.             instanceExit:        DETInstanceExitBlock;
  1725.             );
  1726.         5: (
  1727.             instanceIdle:        DETInstanceIdleBlock;
  1728.             );
  1729.         6: (
  1730.             propertyCommand:    DETPropertyCommandBlock;
  1731.             );
  1732.         7: (
  1733.             maximumTextLength:    DETMaximumTextLengthBlock;
  1734.             );
  1735.         8: (
  1736.             viewListChanged:    DETViewListChangedBlock;
  1737.             );
  1738.         9: (
  1739.             propertyDirtied:    DETPropertyDirtiedBlock;
  1740.             );
  1741.         10: (
  1742.             validateSave:        DETValidateSaveBlock;
  1743.             );
  1744.         11: (
  1745.             dropQuery:            DETDropQueryBlock;
  1746.             );
  1747.         12: (
  1748.             dropMeQuery:        DETDropMeQueryBlock;
  1749.             );
  1750.         13: (
  1751.             attributeCreationBlock: DETAttributeCreationBlock;
  1752.             );
  1753.         14: (
  1754.             attributeNew:        DETAttributeNewBlock;
  1755.             );
  1756.         15: (
  1757.             attributeChange:    DETAttributeChangeBlock;
  1758.             );
  1759.         16: (
  1760.             attributeDelete:    DETAttributeDeleteBlock;
  1761.             );
  1762.         17: (
  1763.             itemNew:            DETItemNewBlock;
  1764.             );
  1765.         18: (
  1766.             patternIn:            DETPatternInBlock;
  1767.             );
  1768.         19: (
  1769.             patternOut:            DETPatternOutBlock;
  1770.             );
  1771.         20: (
  1772.             shouldSync:            DETShouldSyncBlock;
  1773.             );
  1774.         21: (
  1775.             doSync:                DETDoSyncBlock;
  1776.             );
  1777.         22: (
  1778.             openSelf:            DETOpenSelfBlock;
  1779.             );
  1780.         23: (
  1781.             convertToNumber:    DETConvertToNumberBlock;
  1782.             );
  1783.         24: (
  1784.             convertToRString:    DETConvertToRStringBlock;
  1785.             );
  1786.         25: (
  1787.             convertFromNumber:    DETConvertFromNumberBlock;
  1788.             );
  1789.         26: (
  1790.             convertFromRString:    DETConvertFromRStringBlock;
  1791.             );
  1792.         27: (
  1793.             customViewDraw:        DETCustomViewDrawBlock;
  1794.             );
  1795.         28: (
  1796.             customViewMouseDown: DETCustomViewMouseDownBlock;
  1797.             );
  1798.         29: (
  1799.             keyPress:            DETKeyPressBlock;
  1800.             );
  1801.         30: (
  1802.             paste:                DETPasteBlock;
  1803.             );
  1804.         31: (
  1805.             customMenuSelected:    DETCustomMenuSelectedBlock;
  1806.             );
  1807.         32: (
  1808.             customMenuEnabled:    DETCustomMenuEnabledBlock;
  1809.             );
  1810.         33: (
  1811.             dynamicForwarders:    DETDynamicForwardersBlock;
  1812.             );
  1813.         34: (
  1814.             dynamicResource:    DETDynamicResourceBlock;
  1815.             );
  1816.     END;
  1817.  
  1818.  
  1819. CONST
  1820.     uppDETCallBackProcInfo = $000003E0;
  1821.  
  1822. FUNCTION CallDETCallBackProc(VAR callBlockPtr: DETCallBlock; callBackBlockPtr: DETCallBackBlockPtr; userRoutine: DETCallBackUPP): OSErr;
  1823.     {$IFC NOT GENERATINGCFM}
  1824.     INLINE $205F, $4E90;
  1825.     {$ENDC}
  1826.  
  1827. FUNCTION NewDETCallBackProc(userRoutine: DETCallBackProcPtr): DETCallBackUPP;
  1828.     {$IFC NOT GENERATINGCFM }
  1829.     INLINE $2E9F;
  1830.     {$ENDC}
  1831. {  Call-for list:  }
  1832.  
  1833. CONST
  1834.     kDETCallForOther            = 1;                            {  Call for things not listed below (also auto-enabled by DE if any of the below are enabled)  }
  1835.     kDETCallForIdle                = 2;                            {  kDETcmdIdle  }
  1836.     kDETCallForCommands            = 4;                            {  kDETcmdPropertyCommand, kDETcmdSelfOpen  }
  1837.     kDETCallForViewChanges        = 8;                            {  kDETcmdViewListChanged, kDETcmdPropertyDirtied, kDETcmdMaximumTextLength  }
  1838.     kDETCallForDrops            = $10;                            {  kDETcmdDropQuery, kDETcmdDropMeQuery  }
  1839.     kDETCallForAttributes        = $20;                            {  kDETcmdAttributeCreation, kDETcmdAttributeNew, kDETcmdAttributeChange, kDETcmdAttributeDelete  }
  1840.     kDETCallForValidation        = $40;                            {  kDETcmdValidateSave  }
  1841.     kDETCallForKeyPresses        = $80;                            {  kDETcmdKeyPress and kDETcmdPaste  }
  1842.     kDETCallForResources        = $0100;                        {  kDETcmdDynamicResource  }
  1843.     kDETCallForSyncing            = $0200;                        {  kDETcmdShouldSync, kDETcmdDoSync  }
  1844.     kDETCallForEscalation        = $8000;                        {  All calls escalated from the next lower level  }
  1845.     kDETCallForNothing            = 0;                            {  None of the above  }
  1846.     kDETCallForEverything        = $FFFFFFFF;                    {  All of the above  }
  1847.  
  1848.  
  1849. TYPE
  1850.     DETCallProcPtr = ProcPtr;  { FUNCTION DETCall(callBlockPtr: DETCallBlockPtr): OSErr; }
  1851.  
  1852.     DETCallUPP = UniversalProcPtr;
  1853.  
  1854. CONST
  1855.     uppDETCallProcInfo = $000000E0;
  1856.  
  1857. FUNCTION NewDETCallProc(userRoutine: DETCallProcPtr): DETCallUPP;
  1858.     {$IFC NOT GENERATINGCFM }
  1859.     INLINE $2E9F;
  1860.     {$ENDC}
  1861.  
  1862. FUNCTION CallDETCallProc(callBlockPtr: DETCallBlockPtr; userRoutine: DETCallUPP): OSErr;
  1863.     {$IFC NOT GENERATINGCFM}
  1864.     INLINE $205F, $4E90;
  1865.     {$ENDC}
  1866.  
  1867. TYPE
  1868.     DETCall                                = DETCallUPP;
  1869. {  This following macro saves you from having to dig out the call-back pointer from the call block:  }
  1870. { ********************************************************************************** }
  1871. { ******************************** SAM Definitions: ******************************** }
  1872. { ********************************************************************************** }
  1873. {  SAM Developers should use property numbers starting at this point:  }
  1874.  
  1875. CONST
  1876.     kSAMFirstDevProperty        = 50;
  1877.  
  1878. {
  1879.     SAM templates have additional resources/properties that are required
  1880.     for interaction with the AOCE Key Chain.
  1881.     
  1882.      Type    Offset                        Description
  1883.      ----    ------                        -----------
  1884.     'rstr'    kSAMAspectUserName            The user name
  1885.     'rstr'    kSAMAspectKind                The kind of SAM
  1886.     'detn'    kSAMAspectCannotDelete        If 0, then the slot cannot be deleted
  1887.     'sami'    kSAMAspectSlotCreationInfo    The info required to create a slot record
  1888. }
  1889.     kSAMAspectUserName            = 41;
  1890.     kSAMAspectKind                = 42;
  1891.     kSAMAspectCannotDelete        = 43;
  1892.     kSAMAspectSlotCreationInfo    = 44;
  1893.  
  1894. {
  1895. *************************************************************************************
  1896.  ********************************* Admin Definitions: *********************************
  1897.  *************************************************************************************
  1898. }
  1899.     kDETAdminVersion            = -978;
  1900.  
  1901. {$ENDC}
  1902. {$ALIGN RESET}
  1903. {$POP}
  1904.  
  1905. {$SETC UsingIncludes := OCETemplatesIncludes}
  1906.  
  1907. {$ENDC} {__OCETEMPLATES__}
  1908.  
  1909. {$IFC NOT UsingIncludes}
  1910.  END.
  1911. {$ENDC}
  1912.